/** 用户栏目路由 **/

import Layout from '@/layout'

const userRouter = {
  path: '/user',
  component: Layout,
  redirect: 'noRedirect',
  name: 'User',
  meta: { title: '用户', icon: 'chart' },
  hidden: true,
  children: [
    {
      path: 'system',
      redirect: 'system/menu',
      component: () => import('@/views/users/system/index'),
      name: 'System',
      meta: { title: '系统配置', noCache: true },
      children: [
        {
          path: 'menu',
          component: () => import('@/views/users/system/menu'),
          name: 'Menu',
          meta: { title: '菜单权限', noCache: true }
        },
        {
          path: 'dataAuth',
          component: () => import('@/views/users/system/dataAuth'),
          name: 'DataAuth',
          meta: { title: '数据权限', noCache: true }
        }
      ]
    },
    {
      path: 'staffManage',
      name: 'staffManage',
      redirect: { name: 'comparePost' },
      meta: { title: '员工管理', noCache: true },
      component: () => import('@/views/users/staffManagement/comparePost/index.vue'),
      children: [
        {
          path: '/staffManage/comparePost',
          name: 'comparePost',
          meta: { title: '企业岗位', noCache: true },
          component: () => import('@/views/users/staffManagement/comparePost/post.vue')
        },
        {
          path: '/staffManage/postList',
          name: 'postList',
          meta: { name: '岗位列表', noCache: true },
          component: () => import('@/views/users/staffManagement/stationList/postList.vue')
        },
        {
          path: '/staffManage/staffList',
          name: 'staffList',
          meta: { name: '员工列表', noCache: true },
          component: () => import('@/views/users/staffManagement/staffList/index.vue')
        }
      ]
    },
    {
      path: 'userManage',
      name: 'userManage',
      redirect: { name: 'userList' },
      meta: { title: '用户管理', noCache: true },
      component: () => import('@/views/users/userManagement/userList/index.vue'),
      children: [
        {
          path: '/userManage/userList',
          name: 'userList',
          meta: { title: '用户列表', noCache: true },
          component: () => import('@/views/users/userManagement/userList/userList.vue')
        }
      ]
    }
  ]
}

export default userRouter
